﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace RTS
{
	public class RTSUnitTextures : RTSTextures
    {
		private string idle = "LanceManIDLE";
		private string walk = "LanceManWALKING";
		private string attack = "LanceManATTACK1";
		private string death = "LanceManDEATH";

		private string attackRange = "LanceMan_attack range";
		private Texture2D attackRangeTexture;

        public string Idle 
		{
			set { idle = value; }
        }

		public string Walk
		{
			set { walk = value; }
		}

		public string Attack
		{
			set { attack = value; }
		}

		public string Death
		{
			set { death = value; }
		}

		public string AttackRange
		{
			set { attackRange = value; }
		}

		public RTSUnitTextures(TextureSize textureSize)
			: base(textureSize)
        {
			selectionArea = "selection";
			lifeBar = "health bar life";
			lifeBarBackground = "helath bar empty";
			selected = "selection circle";
        }

		public override void LoadContent(ContentManager Content)
		{
			LoadTexture(Unit.Idle, idle, Content);
			LoadTexture(Unit.Walking, walk, Content);
			LoadTexture(Unit.Attack, attack, Content);
			LoadTexture(Unit.Death, death, Content);

			attackRangeTexture = Content.Load<Texture2D>(attackRange);

			base.LoadContent(Content);
		}

		public Texture2D getAttackRangeTexture()
		{
			if (texturesLoaded == false) Trace.WriteLine("Error getAttackRange RTSUnitTextures");

			return attackRangeTexture;
		}

    }
}
